package com.test.mapper;

import com.test.entity.Permission;
import com.test.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    //用户注册
    void userRegistry(User user);

    //根据用户名查询用户
    User findUserByNmae(String userName);

    //根据用户名查询用户的所有角色信息
    User findRolesByUserName(String username);

    //根据角色信息,查询角色对应的多个权限信息
    List<Permission> findPermsByRoleId(Integer roleId);
}
